<?php

class TravelerValidator extends CValidator {
	protected function validateAttribute($object, $attribute) {
		if($object->items->item_num != count($object->$attribute)) {
			if(!$object->isNewRecord)
				$object->addError($attribute, '请填写必要的旅客信息');
		}
	}
}

?>